Why SuperDialog flows are easy to test
SuperDialog is text in, text out. There is no audio to mock, no WebRTC room to spin up, no telephony to stub. Every dialog is a Python function that takes a string and returns a string. This is the killer feature vs. voice-coupled frameworks where tests need audio fixtures.Setup
pytest-asyncio in pyproject.toml:
anyio as specified in the project guidelines.
Basic test
Testing slot collection
Usemachine.state["slots"] to assert that the flow collected the right data:
Testing multi-turn flows
Testing with mock tools
Testing flow reset
Testing flow switching
Traversal snapshots for eval
Settraversal_dir on your test machine to capture every conversation as a JSON file. Use these files as your eval corpus:
Tips
- Use a cheap model (
claude-haiku-4-5) in tests to keep costs low and latency fast - Use
dm.reset()between test cases if reusing a machine instance - Keep flow JSON files in version control so tests are deterministic
- Build a corpus from traversal snapshots, then use
superdialog eval(v0.3) to run regression tests